<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/11 0011
 * Time: 20:22
 */
$socket = new Co\Socket(AF_INET, SOCK_STREAM, 0);

go(function () use ($socket) {
    while (true) {
        $socket->connect('127.0.0.1', 9500);
        $socket->send('任务数据');
        co::sleep(0.1);
    }
});
$socket = new Co\Socket(AF_INET, SOCK_STREAM, 0);
go(function () use ($socket) {
    while (true) {
        $socket->connect('127.0.0.1', 9500);
        $socket->send('任务数据');
        co::sleep(0.1);
    }
});